<layout name='Layout/layout_profile' />
<tagLib name="html" />
<script type="text/javascript">
	function reset_pwd() {
		winopen("{:U('password')}", 730, 300);
	}

	function select_avatar() {
		winopen("{:U('popup/avatar')}?id=" + $("#id").val(), 730, 500);
	}

	function save() {
		if (check_form("form_data")) {
			sendForm("form_data", "{:U('save')}", "__URL__");
		}
	}

	$(document).ready(function() {
		$(".input-date").datepicker();
		set_return_url();
		set_val('sex','{$vo.sex}');
	}); 
</script>
<form method="post" action="" id="form_search" name="form_search">
	<div class="title panel panel-default">
		<div class="panel-body">
			<h3 class="col-md-12">基本资料</h3>
		</div>
	</div>
</form>
<div class="operate panel panel-default">
	<div class="panel-body">
		<div class="pull-right">
			<a onclick="save()"  class="btn btn-default">保存</a>
		</div>
	</div>
</div>
<div class="row">
	<div class="col-md-12">
		<form id="form_data" name="form_data" method="post" class="form-horizontal">			
			<input type="hidden" name="id" id="id"  value="{$vo.id}">			
			<input type="hidden" name="pic" id="pic" value="{$vo.pic}">
			<input type="hidden" name="ajax" id="ajax" value="0">
			<input type="hidden" name="opmode" id="opmode" value="">			
			<table class="table table-bordered" >
				<tr>
					<th>
					<nobr>
						员工编号
					</nobr></th>
					<td colspan="2">
						<p class="form-control-static">{$vo.emp_no}</p>					
					</td>
					<td rowspan="4"><img class="img-thumbnail col-12" id="emp_pic" src="/{:C('SAVE_PATH')}{$vo.pic}"></td>
				</tr>
				<tr>
					<th>姓名</th>
					<td colspan="2">
						<p class="form-control-static">{$vo.name}</p>	
					</td>
				</tr>
				<tr>
					<th>性别</th>
					<td colspan="2">
					<select name="sex" id="sex" class="form-control col-10">
						<option  value="male">男</option>
						<option value="female">女</option>
					</select></td>
				</tr>
				<tr>
					<th>生日</th>
					<td colspan="2">
					<input type="text" id="birthday" name="birthday" readonly="readonly" class="input-date form-control" value="{$vo.birthday}">
					</td>
				</tr>
				<tr>
					<th>部门*</th>
					<td colspan="2">
						<p class="form-control-static">{$vo.dept_name}</p>	
					</td>
					<td colspan="2"><a onclick="select_avatar();" class="btn btn-default">上传头像</a></td>
				</tr>
				<tr>
					<th>职级</th>
					<td>
						<p class="form-control-static">{$vo.position_name}</p>	
					</td>
					<th>职位</th>
					<td>
					<p class="form-control-static">{$vo.rank_name}</p>	
					</td>
				</tr>
				<tr>
					<th>
					<nobr>
						办公室电话
					</nobr></th>
					<td>
					<input type="text" id="office_tel" name="office_tel" class="form-control" value="{$vo.office_tel}">
					</td>
					<th>
					<nobr>
						移动电话
					</nobr></th>
					<td>
					<input type="text" id="mobile_tel" name="mobile_tel" class="form-control" value="{$vo.mobile_tel}">
					</td>
				</tr>
				<tr>
				<tr>
					<th>电子邮箱</th>
					<td colspan="3">
					<p class="form-control-static">{$vo.email}</p>	
					</td>
				</tr>
				<tr>
					<th>
					<nobr>
						负责业务
					</nobr></th>
					<td colspan="3">
					<input type="text" id="duty" name="duty" class="form-control" value="{$vo.duty}">
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>